jQuery.extend(jQuery.easing , {
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	}
});
$.fn.usercard = function() {
	var $card = $("#user-card");
	if(!$card.length) {
		return;
	}
	var $body = $card.find("div.goright");
	var $title = $card.find("div.utitle");
	var $content = $card.find("div.ucontent");
	var $list = $(this);
	$list.mouseover(mouseover).mouseout(mouseout);
	$card.mouseout(cardout);
	var li;
	function mouseover(e) {
		var $t = $(e.target);
		if($t.length && !$t.is(".host_list")) {
			var $li = $t.closest("li");
			if($li.length && li != $li) {
				$body.hide();
				$card.show();
				li = $li[0];
				var offset = $li.offset();
				$card.css({
					top : offset.top - 4,
					left: offset.left - 4
				}).stop(true,false).width(80).animate({width : 252} , 500 ,"easeOutCubic", function() {
					var srv = $li.attr("srv");
					var arr = srv.split("|||");
					$title.html(arr[0]);
					$content.html(arr[1]);
					$body.show();
				});	
			}
		}
	}
	function mouseout(e) {
		var $t = $(e.target);
		if($t.length && !$.contains($list[0] , $t[0])) {
			$card.hide();
		}	
	}
	function cardout(e) {
		var $t = $(e.relatedTarget);
		if($t.length && $.contains($body[0] , $t[0])) {
			$card.stop(true,false).width(80);
		}
		var $target = $(e.target);
		if($target.length && !$.contains($list[0] , $target[0])) {
			$card.hide();
		}
	}
	return this;
};